//路由模块
import Vue from 'vue'
import Home from '../views/Home.vue'
import Search from '../views/Search.vue'
import Comment from '../views/Comment.vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes = [
    {
        path: '/',
        redirect: '/home',
        meta: {
            title: '首页'
        }
    },
    {
        path: '/home',
        component: Home,
        meta: {
            title: '首页'
        }
    },
    {
        path: '/search',
        component: Search,
        meta: {
            title: '搜索'
        }
    },
    {
        path: '/comment',
        component: Comment,
        meta: {
            title: '评论'
        }
    }
]
const router = new VueRouter({
    routes
})

export default router  //导出